package com.latefly.skewwork.data.dto.vo

import com.latefly.skewwork.data.consts.TodoIcon
import java.util.UUID
import kotlin.random.Random

data class TodoItem(
    val task: String,
    val icon: TodoIcon = TodoIcon.Default,
    val id: UUID = UUID.randomUUID()
)

fun generateRandomTodoItem(): TodoItem {
    val message = listOf<String>(
        "Learn compose",
        "Take a code lab",
        "Apply state",
        "Build dynamic UIs"
    ).random()
    val icon = TodoIcon.entries.toTypedArray().random()
    return TodoItem(message, icon)
}

fun randomTin():Float{
    return Random.nextFloat().coerceIn(0.3f,0.9f)
}